#ifndef _SLADHU_DATE_
#define _SLADHU_DATE_
#include <iostream>
#include <iomanip>
namespace sladhu {
class Date {
  public:
    Date()
    :year_(1900),month_(1),day_ (1){}
    int year()const {return year_;}
    bool set_year(int y) { year_ = y;}
    int month()const {return month_;}
    bool set_month(int m);
    int day()const {return day_;}
    bool set_day(int m);
    int week();
    void NextYear() { ++year_;}
    void PreviousYear() { --year_;} 
    void NextMonth(); 
    void PreviousMonth();
    void NextDay();
    void PreviousDay();
    bool IsLeapYear() { if(year_ %4 == 0 && year_ % 100 != 0 || year_ % 400 == 0) return true; else return false;}
    bool operator > (const Date &);
    bool operator >= (const Date &);
    bool operator < (const Date &);
    bool operator <= (const Date &);
    bool operator == (const Date &);
    bool operator != (const Date &);
  private:

    enum CMP{LESS, EQUAL,LARGE};
    int CountWeek(int, int, int);// count week use zeller formula
    enum CMP Compare(const Date &);
    int DaysOfCurrentMonth();
    int year_, month_, day_,;
};
std::ostream& operator << (std::ostream &os, const Date &);
}
#endif
